<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script type="text/javascript">
			class ColorPoint extends Point {
				constructor(x, y, color) {
					super(x, y); // 调用父类的constructor(x, y)
					this.color = color;
				}

				toString() {
					return this.color + ' ' + super.toString(); // 调用父类的toString()
				}
			}
		</script>
	</body>

</html>